package cn.edu.scau.cmi.wangjushen.composit.consistent;

import java.util.ArrayList;
import java.util.List;

public class Team implements Organization {
    private String name;
    public List<Organization> list = new ArrayList<>();
    public Team(String name){
        this.name = name;
    }
    @Override
    public boolean addChild(Organization organization) {
        list.add(organization);
        return true;
    }
    @Override
    public String getName() {
        return name;
    }

    @Override
    public String toString() {
        return "Team("+name+")";
    }

    @Override
    public List<Organization> getChilds() {
        return list;
    }
}
